package com.sushengren.easyword;

import com.sushengren.easyword.annotation.WordProperty;
import com.sushengren.easyword.converters.PictureConverter;
import lombok.*;

import java.io.InputStream;
import java.util.List;

/**
 * 测试数据
 *
 * @author sushengren
 */
@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class DemoData {

    @WordProperty("标题")
    private String title;

    @WordProperty("生成时间")
    private String generationTime;

    @WordProperty("学生数")
    private Integer numberOfStudents;

    @WordProperty("监考老师数")
    private Integer numberOfInvigilators;

    @WordProperty("评卷老师数")
    private Integer numberOfTeachers;

    @WordProperty("年度")
    private String year;

    @WordProperty("学期")
    private String semester;

    @WordProperty("考试时间")
    private String examinationTime;

    @WordProperty("科目")
    private String subject;

    @WordProperty(value = "Logo", converter = PictureConverter.class)
    private InputStream logo;

    @WordProperty("班级列表")
    private List<ClassInfo> classList;

    @Getter
    @Setter
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class ClassInfo {

        @WordProperty("班级")
        private String className;

        @WordProperty("人数")
        private Integer numberOfPeople;

        @WordProperty("平均分")
        private Double theAverageScore;

        @WordProperty("年级")
        private String grade;

        @WordProperty("排名")
        private Integer ranking;

        @WordProperty("班主任")
        private String classTeacher;

        @WordProperty(value = "班级Logo", converter = PictureConverter.class)
        private String classLogo;

        @WordProperty("学生列表")
        private List<StudentInfo> studentList;

    }

    @Getter
    @Setter
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class StudentInfo {

        @WordProperty("姓名")
        private String name;

        @WordProperty("学号")
        private String studentID;

        @WordProperty("总分")
        private Double totalScore;

        @WordProperty("平均分")
        private Double theAverageScore;

        @WordProperty("排名")
        private Integer ranking;

        @WordProperty("年级排名")
        private Integer gradeRanking;

        @WordProperty("备注")
        private String remark;

    }

}
